From e89fc0f525b7a1b608ff152cb59af30d3c2878b4 Mon Sep 17 00:00:00 2001 From: Robert Lipe Date: Sun, 27 Oct 2019 03:44:29 -0500 Subject: [PATCH] Repair inconsistencies in xsl docbook source --- xmldoc/chapters/datums.xml | 6 +- xmldoc/chapters/garmin_icons.xml | 629 ++--- xmldoc/chapters/glossary.xml | 123 +- xmldoc/chapters/preface.xml | 72 +- xmldoc/chapters/styles.xml | 2055 ++++++++--------- xmldoc/chapters/use.xml | 668 +++--- .../options/miniHomer-gps-utc-offset.xml | 1 + .../options/miniHomer-gps-week-rollover.xml | 1 + xmldoc/gpsbabel_man.xml | 206 +- xmldoc/readme.xml | 2 +- 10 files changed, 1887 insertions(+), 1876 deletions(-) create mode 100644 xmldoc/formats/options/miniHomer-gps-utc-offset.xml create mode 100644 xmldoc/formats/options/miniHomer-gps-week-rollover.xml diff --git a/xmldoc/chapters/datums.xml b/xmldoc/chapters/datums.xml index 202077d56..24ea17038 100644 --- a/xmldoc/chapters/datums.xml +++ b/xmldoc/chapters/datums.xml @@ -1,10 +1,10 @@ Supported Datums -Some formats in GPSBabel support multiple datums. For example, the - option to the +Some formats in GPSBabel support multiple datums. For example, the + option to the garmin_txt format allows you to specify -a datum for the output file. +a datum for the output file. The following is a list of the datums supported by GPSBabel. diff --git a/xmldoc/chapters/garmin_icons.xml b/xmldoc/chapters/garmin_icons.xml index 99d0daba5..d6d26ecd3 100644 --- a/xmldoc/chapters/garmin_icons.xml +++ b/xmldoc/chapters/garmin_icons.xml @@ -1,312 +1,321 @@ -Garmin Icons - -Following is a list of the valid values for the -garmin option. -These values are also used internally by the -GDB, -BCR, -Mapsource, -PCX, and -PSITrex -formats. - + Garmin Icons + Following is a list of the valid values for the - -ATV -Airport -Amusement Park -Anchor -Anchor Prohibited -Animal Tracks -Asian Food -Bait and Tackle -Ball Park -Bank -Bar -Beach -Beacon -Bell -Big Game -Bike Trail -Blind -Block, Blue -Block, Green -Block, Red -Blood Trail -Boat Ramp -Border Crossing (Port Of Entry) -Bottom Conditions -Bowling -Bridge -Building -Buoy, White -Campground -Car -Car Rental -Car Repair -Cemetery -Church -Circle with X -Circle, Blue -Circle, Green -Circle, Red -City (Capitol) -City (Large) -City (Medium) -City (Small) -City Hall -Civil -Coast Guard -Contact, Afro -Contact, Alien -Contact, Ball Cap -Contact, Big Ears -Contact, Biker -Contact, Blonde -Contact, Bug -Contact, Cat -Contact, Clown -Contact, Dog -Contact, Dreadlocks -Contact, Female1 -Contact, Female2 -Contact, Female3 -Contact, Glasses -Contact, Goatee -Contact, Kung-Fu -Contact, Panda -Contact, Pig -Contact, Pirate -Contact, Ranger -Contact, Smiley -Contact, Spike -Contact, Sumo -Controlled Area -Convenience Store -Cover -Covey -Crossing -Dam -Danger Area -Deli -Department Store -Diamond, Blue -Diamond, Green -Diamond, Red -Diver Down Flag 1 -Diver Down Flag 2 -Dock -Dot, White -Drinking Water -Dropoff -Elevation point -Event Cache -Exit -Exit without services -Fast Food -First approach fix -Fishing Area -Fishing Hot Spot Facility -Fitness Center -Flag -Flag, Blue -Flag, Green -Flag, Red -Food Source -Forest -Furbearer -Gambling/casino -Gas Station -Geocache -Geocache Found -Geographic place name, Man-made -Geographic place name, land -Geographic place name, water -Ghost Town -Glider Area -Golf Course -Ground Transportation -Heliport -Horn -Hotel -House -Hunting Area -Ice Skating -Information -Intersection -Intl freeway hwy -Intl national hwy -Italian food -Large Ramp intersection -Large exit without services -Letter A, Blue -Letter A, Green -Letter A, Red -Letter B, Blue -Letter B, Green -Letter B, Red -Letter C, Blue -Letter C, Green -Letter C, Red -Letter D, Blue -Letter D, Green -Letter D, Red -Letterbox Cache -Levee -Library -Light -Live Theater -Localizer Outer Marker -Locationless (Reverse) Cache -Lodge -Lodging -Man Overboard -Marina -Medical Facility -Micro-Cache -Mile Marker -Military -Mine -Missed approach point -Movie Theater -Multi-Cache -Multi-Cache -Museum -Navaid, Amber -Navaid, Black -Navaid, Blue -Navaid, Green -Navaid, Green/Red -Navaid, Green/White -Navaid, Orange -Navaid, Red -Navaid, Red/Green -Navaid, Red/White -Navaid, Violet -Navaid, White -Navaid, White/Green -Navaid, White/Red -Non-directional beacon -Null -Number 0, Blue -Number 0, Green -Number 0, Red -Number 1, Blue -Number 1, Green -Number 1, Red -Number 2, Blue -Number 2, Green -Number 2, Red -Number 3, Blue -Number 3, Green -Number 3, Red -Number 4, Blue -Number 4, Green -Number 4, Red -Number 5, Blue -Number 5, Green -Number 5, Red -Number 6, Blue -Number 6, Green -Number 6, Red -Number 7, Blue -Number 7, Green -Number 7, Red -Number 8, Blue -Number 8, Green -Number 8, Red -Number 9, Blue -Number 9, Green -Number 9, Red -Oil Field -Open 24 Hours -Oval, Blue -Oval, Green -Oval, Red -Parachute Area -Park -Parking Area -Pharmacy -Picnic Area -Pin, Blue -Pin, Green -Pin, Red -Pizza -Police Station -Post Office -Post Office -Private Field -Puzzle Cache -RV Park -Radio Beacon -Ramp intersection -Rectangle, Blue -Rectangle, Green -Rectangle, Red -Reef -Residence -Restaurant -Restricted Area -Restroom -Scales -Scenic Area -School -Seafood -Seaplane Base -Shipwreck -Shopping Center -Short Tower -Shower -Ski Resort -Skiing Area -Skull and Crossbones -Small City -Small Game -Soft Field -Square, Blue -Square, Green -Square, Red -Stadium -State Hwy -Steak -Street Intersection -Stump -Summit -Swimming Area -TACAN -Tall Tower -Telephone -Tide/Current PRediction Station -Toll Booth -TracBack Point -Trail Head -Tree Stand -Treed Quarry -Triangle, Blue -Triangle, Green -Triangle, Red -Truck -Truck Stop -Tunnel -U Marina -U stump -US hwy -Ultralight Area -Unknown Cache -Upland Game -VHF Omni-range -VOR-DME -VOR/TACAN -Virtual cache -Water Hydrant -Water Source -Waterfowl -Waypoint -Webcam Cache -Weed Bed -Winery -Wrecker -Zoo - - + garmin + + option. +These values are also used internally by the + + GDB + , + + BCR + , + + Mapsource + , + + PCX + , and + + PSITrex + formats. + + ATV + Airport + Amusement Park + Anchor + Anchor Prohibited + Animal Tracks + Asian Food + Bait and Tackle + Ball Park + Bank + Bar + Beach + Beacon + Bell + Big Game + Bike Trail + Blind + Block, Blue + Block, Green + Block, Red + Blood Trail + Boat Ramp + Border Crossing (Port Of Entry) + Bottom Conditions + Bowling + Bridge + Building + Buoy, White + Campground + Car + Car Rental + Car Repair + Cemetery + Church + Circle with X + Circle, Blue + Circle, Green + Circle, Red + City (Capitol) + City (Large) + City (Medium) + City (Small) + City Hall + Civil + Coast Guard + Contact, Afro + Contact, Alien + Contact, Ball Cap + Contact, Big Ears + Contact, Biker + Contact, Blonde + Contact, Bug + Contact, Cat + Contact, Clown + Contact, Dog + Contact, Dreadlocks + Contact, Female1 + Contact, Female2 + Contact, Female3 + Contact, Glasses + Contact, Goatee + Contact, Kung-Fu + Contact, Panda + Contact, Pig + Contact, Pirate + Contact, Ranger + Contact, Smiley + Contact, Spike + Contact, Sumo + Controlled Area + Convenience Store + Cover + Covey + Crossing + Dam + Danger Area + Deli + Department Store + Diamond, Blue + Diamond, Green + Diamond, Red + Diver Down Flag 1 + Diver Down Flag 2 + Dock + Dot, White + Drinking Water + Dropoff + Elevation point + Event Cache + Exit + Exit without services + Fast Food + First approach fix + Fishing Area + Fishing Hot Spot Facility + Fitness Center + Flag + Flag, Blue + Flag, Green + Flag, Red + Food Source + Forest + Furbearer + Gambling/casino + Gas Station + Geocache + Geocache Found + Geographic place name, Man-made + Geographic place name, land + Geographic place name, water + Ghost Town + Glider Area + Golf Course + Ground Transportation + Heliport + Horn + Hotel + House + Hunting Area + Ice Skating + Information + Intersection + Intl freeway hwy + Intl national hwy + Italian food + Large Ramp intersection + Large exit without services + Letter A, Blue + Letter A, Green + Letter A, Red + Letter B, Blue + Letter B, Green + Letter B, Red + Letter C, Blue + Letter C, Green + Letter C, Red + Letter D, Blue + Letter D, Green + Letter D, Red + Letterbox Cache + Levee + Library + Light + Live Theater + Localizer Outer Marker + Locationless (Reverse) Cache + Lodge + Lodging + Man Overboard + Marina + Medical Facility + Micro-Cache + Mile Marker + Military + Mine + Missed approach point + Movie Theater + Multi-Cache + Multi-Cache + Museum + Navaid, Amber + Navaid, Black + Navaid, Blue + Navaid, Green + Navaid, Green/Red + Navaid, Green/White + Navaid, Orange + Navaid, Red + Navaid, Red/Green + Navaid, Red/White + Navaid, Violet + Navaid, White + Navaid, White/Green + Navaid, White/Red + Non-directional beacon + Null + Number 0, Blue + Number 0, Green + Number 0, Red + Number 1, Blue + Number 1, Green + Number 1, Red + Number 2, Blue + Number 2, Green + Number 2, Red + Number 3, Blue + Number 3, Green + Number 3, Red + Number 4, Blue + Number 4, Green + Number 4, Red + Number 5, Blue + Number 5, Green + Number 5, Red + Number 6, Blue + Number 6, Green + Number 6, Red + Number 7, Blue + Number 7, Green + Number 7, Red + Number 8, Blue + Number 8, Green + Number 8, Red + Number 9, Blue + Number 9, Green + Number 9, Red + Oil Field + Open 24 Hours + Oval, Blue + Oval, Green + Oval, Red + Parachute Area + Park + Parking Area + Pharmacy + Picnic Area + Pin, Blue + Pin, Green + Pin, Red + Pizza + Police Station + Post Office + Post Office + Private Field + Puzzle Cache + RV Park + Radio Beacon + Ramp intersection + Rectangle, Blue + Rectangle, Green + Rectangle, Red + Reef + Residence + Restaurant + Restricted Area + Restroom + Scales + Scenic Area + School + Seafood + Seaplane Base + Shipwreck + Shopping Center + Short Tower + Shower + Ski Resort + Skiing Area + Skull and Crossbones + Small City + Small Game + Soft Field + Square, Blue + Square, Green + Square, Red + Stadium + State Hwy + Steak + Street Intersection + Stump + Summit + Swimming Area + TACAN + Tall Tower + Telephone + Tide/Current PRediction Station + Toll Booth + TracBack Point + Trail Head + Tree Stand + Treed Quarry + Triangle, Blue + Triangle, Green + Triangle, Red + Truck + Truck Stop + Tunnel + U Marina + U stump + US hwy + Ultralight Area + Unknown Cache + Upland Game + VHF Omni-range + VOR-DME + VOR/TACAN + Virtual cache + Water Hydrant + Water Source + Waterfowl + Waypoint + Webcam Cache + Weed Bed + Winery + Wrecker + Zoo + + \ No newline at end of file diff --git a/xmldoc/chapters/glossary.xml b/xmldoc/chapters/glossary.xml index 4dd7effe4..9d02a1eda 100644 --- a/xmldoc/chapters/glossary.xml +++ b/xmldoc/chapters/glossary.xml @@ -1,75 +1,76 @@ - - Glossary - Terms that are used in conjunction with GPSBabel. - - G - - Geocaching - - GPS based "paper chase", see - - - - - - I - - Itinerary - - same as a Route (e.g. used by TomTom) - - - - - P - - Points of Interest (POI) - - a collection of gas stations, post boxes, shops and + + Glossary + Terms that are used in conjunction with GPSBabel. + + G + + Geocaching + + GPS based "paper chase", see + + + + + + + I + + Itinerary + + same as a Route (e.g. used by TomTom) + + + + + P + + Points of Interest (POI) + + a collection of gas stations, post boxes, shops and like. - - - - - R - - Route - - a list of geopoints (often with names) connected in + + + + + R + + Route + + a list of geopoints (often with names) connected in a specific order. Usually a collection of geopoints defining the route you want to pass while traveling, created by PC software, or generated inside a GPS device. They can be composed of existing waypoints, or new - "routepoints" might be generated. - - - - - T - - Track - - a collection of geopoints recorded by your GPS - device while traveling -- "breadcrumb trails". The order + "routepoints" might be generated. + + + + + T + + Track + + a collection of geopoints recorded by your GPS + device while traveling -- "breadcrumb trails". The order of trackpoints within the track is important. Usually a trackpoint doesn't have a name or comment, but a timestamp. This distinguishes a trackpoint from a waypoint. - - - - - W - - Waypoints - - are geopoints that are not necessarily connected to + + + + + W + + Waypoints + + are geopoints that are not necessarily connected to other points, and their order is unimportant. They can be entered before, while or after you actually visit the place and might have tags like name, comment and the like. Usually used to mark special locations as your home, a hotel or a geocache. - - - - + + + + \ No newline at end of file diff --git a/xmldoc/chapters/preface.xml b/xmldoc/chapters/preface.xml index e74de5b4f..917212aaa 100644 --- a/xmldoc/chapters/preface.xml +++ b/xmldoc/chapters/preface.xml @@ -1,36 +1,46 @@ - - Introduction to GPSBabel -
- The Problem: Too many incompatible GPS file formats - There are simply too many gratuitously different file formats + + Introduction to GPSBabel +
+ The Problem: Too many incompatible GPS file formats + There are simply too many gratuitously different file formats to hold waypoint, track, and route information in various programs -used by computers and GPS receivers. -GPX defines a +used by computers and GPS receivers. + + GPX + defines a standard in XML to contain all the data, but there are too many -programs that don't understand it yet and too much data in -alternate formats. - - -Perhaps you have an Explorist 600 and your friend has a StreetPilot 2720. +programs that don't understand it yet and too much data in +alternate formats. + Perhaps you have an + Explorist 600 + and your friend has a + StreetPilot 2720 + . You've collected a list of your favorite locations as waypoints and you'd -like to be able to share them. Unfortunately, his copy of Garmin Mapsource -won't read data created by your copy of Magellan Mapsend DirectRoute. What you need -is a program that converts data between the two programs. - - -GPSBabel actually solves that problem for you and much more... +like to be able to share them. Unfortunately, his copy of + Garmin Mapsource + won't read data created by your copy of + Magellan Mapsend DirectRoute + . What you need +is a program that converts data between the two programs. + GPSBabel actually solves that problem for you and much more... -
-
- The Solution - The original author of GPSBabel, Robert Lipe, needed to convert waypoints between a couple of formats, so he +
+
+ The Solution + The original author of GPSBabel, + Robert Lipe + , needed to convert waypoints between a couple of formats, so he whipped up a converter and designed it upon an extensible foundation so -that it was easy to add new formats and made the program freely available. Many others have contributed to the program since then. - Most file formats added so far have taken under 200 - lines of reasonable ISO C so they can be stamped - out pretty trivially. Formats that are ASCII text delimited in some - fixed way can be added with no programming at all via our - style mechanism. - -
-
+that it was easy to add new formats and made the program freely available. + Many others + have contributed to the program since then.
+ Most file formats added so far have taken under 200 + lines of reasonable ISO C so they can be stamped + out pretty trivially. Formats that are ASCII text delimited in some + fixed way can be added with no programming at all via our + + style + mechanism. +
+
\ No newline at end of file diff --git a/xmldoc/chapters/styles.xml b/xmldoc/chapters/styles.xml index d2551382c..5a4f8b43a 100644 --- a/xmldoc/chapters/styles.xml +++ b/xmldoc/chapters/styles.xml @@ -1,1433 +1,1286 @@ -GPSBabel XCSV Style Files - -
-Introduction to GPSBabel Styles - -Often it is desirable to add a new file format for "one-off" work (perhaps + GPSBabel XCSV Style Files +
+ Introduction to GPSBabel Styles + Often it is desirable to add a new file format for "one-off" work (perhaps you want to export something to a spreadsheet or graphing program) or to read a format that GPSBabel does not yet support. For suitably simple formats, -this can be done by a user with no programming experience by providing a +this can be done by a user with no programming experience by providing a GPSBabel style file. - -For a format to be described by a style file, it must be predictable and -generally readable by humant. Formats with binary or unreadable content + For a format to be described by a style file, it must be predictable and +generally readable by humant. Formats with binary or unreadable content are not good fits for this scheme. It should have: - -A fixed header at the beginning, if it has any at all. This is called a 'prologue'. -Waypoints that are grouped by fixed separators, often a newline. In style file parlance, this is called a 'record'. -Traits of that waypoint described in that record. In the style files, these are called 'fields' and examples may include longitude or a name. -Fields that are grouped by fixed separators, often a comma or a tab. In the style files, this is called the field separator. Fields may be enclosed by characters, such as a double quote. -A fixed footer at the end, if it has any at all. This is called the 'epilogue'. - - - -Once you have created a style file that describes the file format you have -or want, you must tell GPSBabel to use the xcsv format and have the xcsv -format use that file. If you created a new style file called -"mystyle.style" and you want to write the waypoints from -a GPX file named "mine.gpx" to it, you would issue a command like: - -gpsbabel -i gpx -f mine.gpx -o xcsv,style=mystyle.style -F mine.new - -You might then examine mine.new to see if it met -your expectations. If not, you could continue to tweak -mystyle.style until it did, rerunning the above -command each time. If 'mystyle' is a format + + A fixed header at the beginning, if it has any at all. This is called a 'prologue'. + Waypoints that are grouped by fixed separators, often a newline. In style file parlance, this is called a 'record'. + Traits of that waypoint described in that record. In the style files, these are called 'fields' and examples may include longitude or a name. + Fields that are grouped by fixed separators, often a comma or a tab. In the style files, this is called the field separator. Fields may be enclosed by characters, such as a double quote. + A fixed footer at the end, if it has any at all. This is called the 'epilogue'. + + Once you have created a style file that describes the file format you have +or want, you must tell GPSBabel to use the xcsv format and have the xcsv +format use that file. If you created a new style file called +"mystyle.style" and you want to write the waypoints from +a GPX file named "mine.gpx" to it, you would issue a command like: + + + gpsbabel -i gpx -f mine.gpx -o xcsv,style=mystyle.style -F mine.new + + You might then examine + mine.new + to see if it met +your expectations. If not, you could continue to tweak + + mystyle.style + until it did, rerunning the above +command each time. If 'mystyle' is a format that describes a popular program or is likely to be of use to others, you can -then share mystyle.style with other GPSBabel users. -Send it along with a coherent description to the GPSBabel-Misc mailing -list for consideration to be included in a future version. - -
-
-Style file overview - -The first and foremost important step is understanding how the style +then share + + + + + + + mystyle.style + with other GPSBabel users. +Send it along with a coherent description to the GPSBabel-Misc mailing +list for consideration to be included in a future version. +
+
+ Style file overview + The first and foremost important step is understanding how the style file is laid out itself. The format is: -DIRECTIVE<whitespace>VALUE - -Where <whitespace> is one or more spaces or tabs. There should + DIRECTIVE<whitespace>VALUE + Where <whitespace> is one or more spaces or tabs. There should be no spaces or tabs at the beginning of the line; all directives start at the left edge in column zero. - -An example style format is shown here: - + An example style format is shown here: + + + + + + -# Format: MS S&T 2002/2003 + # Format: MS S&T 2002/2003 # Author: Alex Mottram # Date: 12/09/2002 # -DESCRIPTION Microsoft Streets and Trips 2002-2006 +DESCRIPTION Microsoft Streets and Trips 2002-2006 EXTENSION txt # # FILE LAYOUT DEFINITIIONS: # -FIELD_DELIMITER TAB -RECORD_DELIMITER NEWLINE -BADCHARS ," +FIELD_DELIMITER TAB +RECORD_DELIMITER NEWLINE +BADCHARS ," -PROLOGUE Name Latitude Longitude Description URL Type Container Diff Terr +PROLOGUE Name Latitude Longitude Description URL Type Container Diff Terr # # INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE: -# NOTE: MS S&T ONLY IMPORTS DATA, IT DOESN'T -# EXPORT THIS ANYWHERE SO WE CAN HAVE OUR -# WAY WITH THE FORMATTING. +# NOTE: MS S&T ONLY IMPORTS DATA, IT DOESN'T +# EXPORT THIS ANYWHERE SO WE CAN HAVE OUR +# WAY WITH THE FORMATTING. # -IFIELD SHORTNAME, "", "%s" # Name -IFIELD LAT_DECIMAL, "", "%f" # Latitude -IFIELD LON_DECIMAL, "", "%f" # Longitude -IFIELD DESCRIPTION, "", "%s" # Name 2 (Big Description) -IFIELD URL, "", "%s" # URL -IFIELD GEOCACHE_TYPE, "", "%s" # Geocache Type -IFIELD GEOCACHE_CONTAINER, "", "%s" # Geocache Type -IFIELD GEOCACHE_DIFF, "", "%3.1f" # Geocache Type -IFIELD GEOCACHE_TERR, "", "%3.1f" # Geocache Type +IFIELD SHORTNAME, "", "%s" # Name +IFIELD LAT_DECIMAL, "", "%f" # Latitude +IFIELD LON_DECIMAL, "", "%f" # Longitude +IFIELD DESCRIPTION, "", "%s" # Name 2 (Big Description) +IFIELD URL, "", "%s" # URL +IFIELD GEOCACHE_TYPE, "", "%s" # Geocache Type +IFIELD GEOCACHE_CONTAINER, "", "%s" # Geocache Type +IFIELD GEOCACHE_DIFF, "", "%3.1f" # Geocache Type +IFIELD GEOCACHE_TERR, "", "%3.1f" # Geocache Type -Each of these lines will be explained in the following sections. - -
- -
-Internal Constants - -A few internal constants are defined in the XCSV parser to make the style -file simpler. They may or may not be used and are optional in most cases. + Each of these lines will be explained in the following sections. +
+ +
+ Internal Constants + A few internal constants are defined in the XCSV parser to make the style +file simpler. They may or may not be used and are optional in most cases. Note that only certain style file directives map these constants. - - - -Style Constant -Maps to Char(s) - -COMMA, - - -COMMASPACE,<space> - - -SINGLEQUOTE' - - -DOUBLEQUOTE" - - -COLON: - - -SEMICOLON; - - -NEWLINE\n - - -CR\r - - -CRNEWLINE\r\n - - -TAB\t - - -SPACE<space> - - -HASH# - - -PIPE| - - -WHITESPACEsee below - - - -
-WHITESPACE - -The WHITESPACE constant has special properties. When reading data, + + + + Style Constant + Maps to Char(s) + + COMMA + , + + + COMMASPACE + ,<space> + + + SINGLEQUOTE + ' + + + DOUBLEQUOTE + " + + + COLON + : + + + SEMICOLON + ; + + + NEWLINE + \n + + + CR + \r + + + CRNEWLINE + \r\n + + + TAB + \t + + + SPACE + <space> + + + HASH + # + + + PIPE + | + + + WHITESPACE + see below + + + +
+ WHITESPACE + The WHITESPACE constant has special properties. When reading data, WHITESPACE refers to sequential runs of SPACES and/or TABS. When writing data, WHITESPACE is always a single SPACE. - -For example, the following line: + For example, the following line: -SOME_NAME 30.1208 -91.1365 SOME OTHER NAME + SOME_NAME 30.1208 -91.1365 SOME OTHER NAME - -Parses into the following data fields: + Parses into the following data fields: -SOME_NAME,30.1208,-91.1365,SOME,OTHER,NAME + SOME_NAME,30.1208,-91.1365,SOME,OTHER,NAME -
- -
-COMMENTS - -Anything after a hash (#) on a line is not parsed. For example: +
+
+ COMMENTS + Anything after a hash (#) on a line is not parsed. For example: -#THIS ENTIRE LINE IS A COMMENT. -#FIELD LAT_DECIMAL, "", "%f" THIS ENTIRE LINE IS A COMMENT -FIELD LAT_DECIMAL, "", "%f" # ONLY THIS SENTENCE IS A COMMENT. + #THIS ENTIRE LINE IS A COMMENT. +#FIELD LAT_DECIMAL, "", "%f" THIS ENTIRE LINE IS A COMMENT +FIELD LAT_DECIMAL, "", "%f" # ONLY THIS SENTENCE IS A COMMENT. -
-
- -
-Global Properties of the File - -There are a few available directives to describe general traits of the +
+
+ +
+ Global Properties of the File + There are a few available directives to describe general traits of the file being described and not specific data within the file itself. -
-DESCRIPTION - -This is the description of the file format being described. This text +
+ DESCRIPTION + This is the description of the file format being described. This text appears in the help screens and in menus used by the various GUI wrappers. -
-
-EXTENSION - -This directive gives the filename extension generally associated with +
+
+ EXTENSION + This directive gives the filename extension generally associated with this file. -
-
-ENCODING - -Describes the character set used by this format. The value given +
+
+ ENCODING + Describes the character set used by this format. The value given must be one listed by 'gpsbabel -l'. example: - ENCODING UTF-8 # Use UTF-8 for input and output. + ENCODING UTF-8 # Use UTF-8 for input and output. -
-
-DATUM - -This value specifies the GPS datum to be used on read or write. Valid values for this -option are listed in . - - DATUM European 1950 +
+
+ DATUM + This value specifies the GPS datum to be used on read or write. Valid values for this +option are listed in + + + + + + + + . + DATUM European 1950 -
-
-DATATYPE - -Specifies the kind of data we have to read or write. +
+
+ DATATYPE + Specifies the kind of data we have to read or write. - -By default all data are seen as waypoint data. With DATATYPE you are now able to bind + By default all data are seen as waypoint data. With DATATYPE you are now able to bind a specific type to this format. Possible values are WAYPOINT, ROUTE or TRACK. - DATATYPE ROUTE # route-only format + DATATYPE ROUTE # route-only format -
-
- -
-GPSBabel Behavior Directives - -There are a few available directives to control some of the internal +
+
+ +
+ GPSBabel Behavior Directives + There are a few available directives to control some of the internal processing functions of GPSBabel. -
-SHORTLEN - - This sets the maximum allowed shortname length when using the internal +
+ SHORTLEN + This sets the maximum allowed shortname length when using the internal shortname synthesizer. - - example: + example: - SHORTLEN 16 # shortnames will be at most 16 characters long. + SHORTLEN 16 # shortnames will be at most 16 characters long. -
- -
-SHORTWHITE - - This tells the shortname synthesizer whether or not to allow whitespace +
+
+ SHORTWHITE + This tells the shortname synthesizer whether or not to allow whitespace in the synthesized shortnames. Allowed values are zero and one. - - example: + example: - SHORTWHITE 0 # Do not allow whitespace in shortname. - SHORTWHITE 1 # Allow whitespace in shortname. + SHORTWHITE 0 # Do not allow whitespace in shortname. + SHORTWHITE 1 # Allow whitespace in shortname. -
-
- -
-Defining the Layout of the File - -The first few directives define the layout the physical file itself: +
+
+ +
+ Defining the Layout of the File + The first few directives define the layout the physical file itself: - -
-FIELD_DELIMITER - - The field delimiter defines the character(s) that separate the fields in - the rows of data inside the XCSV file. Common field delimiters are commas - and tabs. (referred to as "comma separated values" and "tab separated - values") +
+ FIELD_DELIMITER + The field delimiter defines the character(s) that separate the fields in + the rows of data inside the XCSV file. Common field delimiters are commas + and tabs. (referred to as "comma separated values" and "tab separated + values") - - examples: + examples: - FIELD_DELIMITER COMMA + FIELD_DELIMITER COMMA FIELD_DELIMITER ~ - - The directive FIELD_DELIMITER is parsed for STYLE CONSTANTS as defined in + The directive FIELD_DELIMITER is parsed for STYLE CONSTANTS as defined in the table above. -
- -
-FIELD_ENCLOSER - - The field encloser defines the character(s) that surround the field values. +
+
+ FIELD_ENCLOSER + The field encloser defines the character(s) that surround the field values. Common field enclosers are single and double quote marks. Many styles will leave this directive unset. If set, it will be applied to all fields. - - examples: + examples: - FIELD_ENCLOSER DOUBLEQUOTE + FIELD_ENCLOSER DOUBLEQUOTE FIELD_ENCLOSER SINGLEQUOTE - - The directive FIELD_ENCLOSER is parsed for STYLE CONSTANTS as defined in + The directive FIELD_ENCLOSER is parsed for STYLE CONSTANTS as defined in the table above. -
- -
-RECORD_DELIMITER - - The record delimiter defines that character(s) that separate ROWS of +
+
+ RECORD_DELIMITER + The record delimiter defines that character(s) that separate ROWS of data (FIELDS) in the XCSV file. The most common record delimiters are NEWLINE and CR (carriage return). - - examples: + examples: - RECORD_DELIMITER NEWLINE + RECORD_DELIMITER NEWLINE RECORD_DELIMITER | - - The directive RECORD_DELIMITER is parsed for STYLE CONSTANTS as defined + The directive RECORD_DELIMITER is parsed for STYLE CONSTANTS as defined in the table above. -
- -
-BADCHARS - - Bad characters are things that should *never* be written into the XCSV +
+
+ BADCHARS + Bad characters are things that should *never* be written into the XCSV file as data on output. GPSBabel automatically includes any non-blank FIELD_DELIMITER and FIELD_ENCLOSER and RECORD_DELIMITER characters as BADCHARS by default. - - examples: + examples: - BADCHARS COMMA + BADCHARS COMMA BADCHARS ~| - - The directive BADCHARS is parsed for STYLE CONSTANTS as defined in the + The directive BADCHARS is parsed for STYLE CONSTANTS as defined in the table above. -
- -
-PROLOGUE - - A prologue is basically constant data that is written to the output - file BEFORE any waypoints are processed. PROLOGUE can be defined - multiple times in the style file, once for each "line" before the data - begins. This is commonly used in XCSV files as a "header" row. +
+
+ PROLOGUE + A prologue is basically constant data that is written to the output + file BEFORE any waypoints are processed. PROLOGUE can be defined + multiple times in the style file, once for each "line" before the data + begins. This is commonly used in XCSV files as a "header" row. - - examples: + examples: - PROLOGUE OziExplorer Waypoint File Version 1.1 - PROLOGUE WGS 84 - PROLOGUE Symbol,Name,Latitude,Longitude + PROLOGUE OziExplorer Waypoint File Version 1.1 + PROLOGUE WGS 84 + PROLOGUE Symbol,Name,Latitude,Longitude -
- -
-EPILOGUE - - An Epilogue is the same as a prologue, except this data is written at +
+
+ EPILOGUE + An Epilogue is the same as a prologue, except this data is written at the END of the file. See the examples for PROLOGUE above. -
-
- -
-Defining Fields Within the File - -A field defines data. There are two different classifications of FIELDS, +
+
+ +
+ Defining Fields Within the File + A field defines data. There are two different classifications of FIELDS, IFIELD (file input) and OFIELD (file output). In the absence of any OFIELDS, -IFIELDS are use as both input and output. The existence of OFIELDS is -primarily to allow more flexible mapping of GPSBabel data to output data -(say, for instance, to map the internal GPSBabel "description" variable to -two or more fields on output). For all practical purposes, IFIELDS and +IFIELDS are use as both input and output. The existence of OFIELDS is +primarily to allow more flexible mapping of GPSBabel data to output data +(say, for instance, to map the internal GPSBabel "description" variable to +two or more fields on output). For all practical purposes, IFIELDS and OFIELDS are defined the same way in the style file. -The following per-field options are defined: + The following per-field options are defined: - - - - "no_delim_before" is supported on in OFIELD tags to specify that this + + + "no_delim_before" is supported on in OFIELD tags to specify that this field should be written without a field delimiter before it. It's useful for limited field concatenation. - - - - - "absolute" is supported on OFIELD tags for lat and lon to indicate + + + "absolute" is supported on OFIELD tags for lat and lon to indicate that only absolute values (never negative) are to be printed. - - - - - "optional" is supported only OFIELD tags and indicates that the + + + "optional" is supported only OFIELD tags and indicates that the field may or may not be available in the source data. If the field is absent, no trailing field separator is written. - - This attribute is most useful when paired with "no_delim_before" as + This attribute is most useful when paired with "no_delim_before" as it allows you to concatenate fields without concern for whether those fields are actually populated or not. - - - - - -There are several different types of fields that may be defined. Each field -consists of three pieces of information: the FIELD TYPE, a DEFAULT VALUE, and + + + There are several different types of fields that may be defined. Each field +consists of three pieces of information: the FIELD TYPE, a DEFAULT VALUE, and a PRINTF CONVERSION (for output). In many cases, not all pieces are used, but all 3 pieces are required. Additionally, an fourth field is supported that modifies the behaviour of the field being described. - -FIELDS should be defined in the style file in the logical order that they + FIELDS should be defined in the style file in the logical order that they appear in the data, from left to right. This is the order in which they are parsed from input and written to output. - -The fields used by the XCSV parser are as follows: + The fields used by the XCSV parser are as follows: - -
-IGNORE - - IGNORE fields are, guess what, ignored on input. Internally, IGNORE - fields are treated as CHARACTER data, and as such, require a printf - conversion for a character array. +
+ IGNORE + IGNORE fields are, guess what, ignored on input. Internally, IGNORE + fields are treated as CHARACTER data, and as such, require a printf + conversion for a character array. - -examples: + examples: - IFIELD IGNORE,"","%14.14s" # (writes a 14 character blank field) - IFIELD IGNORE,"","%s" # (writes a blank field on output) + IFIELD IGNORE,"","%14.14s" # (writes a 14 character blank field) + IFIELD IGNORE,"","%s" # (writes a blank field on output) -
- -
-CONSTANT - - CONSTANT fields are, of course, constant. They are ignored on input, - however they write CONSTANT data on output. As such, they require a - DEFAULT VALUE and a printf conversion for a character array. +
+
+ CONSTANT + CONSTANT fields are, of course, constant. They are ignored on input, + however they write CONSTANT data on output. As such, they require a + DEFAULT VALUE and a printf conversion for a character array. - -examples: + examples: - IFIELD CONSTANT,"FFFFFF","%s" # (writes "FFFFFF" in the field) - IFIELD CONSTANT,"01/01/70","%s" # (a constant date field) + IFIELD CONSTANT,"FFFFFF","%s" # (writes "FFFFFF" in the field) + IFIELD CONSTANT,"01/01/70","%s" # (a constant date field) -
- -
-INDEX - - An INDEX field is used ONLY on output. The INDEX constant defines a field - that, at output, contains the sequence number of the waypoint being - written, starting at 0. An index is managed internally as an INTEGER +
+
+ INDEX + An INDEX field is used ONLY on output. The INDEX constant defines a field + that, at output, contains the sequence number of the waypoint being + written, starting at 0. An index is managed internally as an INTEGER and requires an INTEGER printf conversion. An INDEX has one special - property. The DEFAULT VALUE of the index is added to the index - on each iteration (to allow indexes starting at 1, 100, etc..). + property. The DEFAULT VALUE of the index is added to the index + on each iteration (to allow indexes starting at 1, 100, etc..). - -examples: + examples: - IFIELD INDEX,"0","%04d" # (Starts counting at zero) - IFIELD INDEX,"","%04d" # (Starts counting at zero) - IFIELD INDEX,"1","%04d" # (Starts counting at one) + IFIELD INDEX,"0","%04d" # (Starts counting at zero) + IFIELD INDEX,"","%04d" # (Starts counting at zero) + IFIELD INDEX,"1","%04d" # (Starts counting at one) -
- -
-SHORTNAME - - A SHORTNAME is generally the waypoint name of the data being processed. - SHORTNAME maps directly to the GPSBabel variable ->shortname. A SHORTNAME +
+
+ SHORTNAME + A SHORTNAME is generally the waypoint name of the data being processed. + SHORTNAME maps directly to the GPSBabel variable ->shortname. A SHORTNAME is CHARACTER data and requires a character array printf conversion. - -example: + example: - IFIELD SHORTNAME,"","%s" + IFIELD SHORTNAME,"","%s" -
- -
-DESCRIPTION - - A DESCRIPTION is generally a long description of the waypoint. A - DESCRIPTION maps to the GPSBabel variable ->description and is otherwise +
+
+ DESCRIPTION + A DESCRIPTION is generally a long description of the waypoint. A + DESCRIPTION maps to the GPSBabel variable ->description and is otherwise handled exactly like a SHORTNAME. - -examples: + examples: - IFIELD DESCRIPTION,"","%s" + IFIELD DESCRIPTION,"","%s" -
- -
-NOTES - - NOTES are generally everything else about a waypoints. NOTES map to the - GPSBabel variable ->notes and is otherwise handled exactly like a +
+
+ NOTES + NOTES are generally everything else about a waypoints. NOTES map to the + GPSBabel variable ->notes and is otherwise handled exactly like a SHORTNAME. -
- -
-URL - - URL is a URL for the waypoint. URL maps to the GPSBabel variable - ->url and is otherwise handled exactly like a SHORTNAME. +
+
+ URL + URL is a URL for the waypoint. URL maps to the GPSBabel variable + ->url and is otherwise handled exactly like a SHORTNAME. - -example: + example: - IFIELD URL,"","%s" + IFIELD URL,"","%s" -
- -
-URL_LINK_TEXT - - URL_LINK_TEXT is a textual description of where a URL points. - URL_LINK_TEXT maps to the GPSBabel variable ->url_link_text and +
+
+ URL_LINK_TEXT + URL_LINK_TEXT is a textual description of where a URL points. + URL_LINK_TEXT maps to the GPSBabel variable ->url_link_text and is otherwise handled exactly like a SHORTNAME. - -example: + example: - IFIELD URL_LINK_TEXT,"","%s" + IFIELD URL_LINK_TEXT,"","%s" -
- -
-ICON_DESCR - - ICON_DESCR is a textual description of an icon type for a waypoint. - ICON_DESCR maps to the GPSBabel variable ->icon_desc and is otherwise +
+
+ ICON_DESCR + ICON_DESCR is a textual description of an icon type for a waypoint. + ICON_DESCR maps to the GPSBabel variable ->icon_desc and is otherwise handled exactly like a SHORTNAME. - -example: + example: - IFIELD ICON_DESCR,"","%s" + IFIELD ICON_DESCR,"","%s" -
- -
-LAT_DECIMAL - - LAT_DECIMAL defines LATITUDE in DECIMAL format. Note that this is a PURE - signed decimal format (i.e. -91.0000). This data is handled internally as +
+
+ LAT_DECIMAL + LAT_DECIMAL defines LATITUDE in DECIMAL format. Note that this is a PURE + signed decimal format (i.e. -91.0000). This data is handled internally as a DOUBLE PRECISION FLOAT and requires a FLOATING POINT printf conversion. - -example: + example: - IFIELD LAT_DECIMAL,"","%f" + IFIELD LAT_DECIMAL,"","%f" -
- - -
-LON_DECIMAL - - See LAT_DECIMAL, except LON_DECIMAL defines LONGITUDE. +
+
+ LON_DECIMAL + See LAT_DECIMAL, except LON_DECIMAL defines LONGITUDE. -
- -
-LAT_INT32DEG - - LAT_INT32DEG defines LATITUDE in what I call INT32DEGREES. This value is +
+
+ LAT_INT32DEG + LAT_INT32DEG defines LATITUDE in what I call INT32DEGREES. This value is a signed LONG INTEGER and requires a LONG INTEGER printf conversion. (This format is only used by some DeLorme products.) - -example: + example: - IFIELD LAT_INT32DEG,"","%ld" + IFIELD LAT_INT32DEG,"","%ld" -
- -
-LON_INT32DEG - - See LON_INT32DEG except LON_INT32DEG defines LONGITUDE. +
+
+ LON_INT32DEG + See LON_INT32DEG except LON_INT32DEG defines LONGITUDE. -
- -
-LAT_DECIMALDIR / LAT_DIRDECIMAL - - LAT_DECIMALDIR and LAT_DIRDECIMAL define LATITUDE in DECIMAL format - with the added bonus of a 'N/S' or 'E/W' direction character. This data - is handled internally as a DOUBLE PRECISION FLOAT and a single - CHARACTER and requires a FLOATING POINT as well as a CHARACTER printf +
+
+ LAT_DECIMALDIR / LAT_DIRDECIMAL + LAT_DECIMALDIR and LAT_DIRDECIMAL define LATITUDE in DECIMAL format + with the added bonus of a 'N/S' or 'E/W' direction character. This data + is handled internally as a DOUBLE PRECISION FLOAT and a single + CHARACTER and requires a FLOATING POINT as well as a CHARACTER printf conversion. The only difference between the two is whether the directional character appears before (LAT_DIRDECIMAL) or after (LAT_DECIMALDIR) the decimal number. - -examples: + examples: - IFIELD LAT_DECIMALDIR,"","%f %c" # (writes 31.333 N) - IFIELD LAT_DIRDECIMAL,"","%c %f" # (writes N 31.333) + IFIELD LAT_DECIMALDIR,"","%f %c" # (writes 31.333 N) + IFIELD LAT_DIRDECIMAL,"","%c %f" # (writes N 31.333) -
- -
-LON_DECIMALDIR / LON_DIRDECIMAL - - Same as LAT_DECIMALDIR / LAT_DIRDECIMAL except LON_ defines LONGITUDE. +
+
+ LON_DECIMALDIR / LON_DIRDECIMAL + Same as LAT_DECIMALDIR / LAT_DIRDECIMAL except LON_ defines LONGITUDE. -
- -
-LAT_DIR / LON_DIR - - LAT_DIR returns the single character 'N' or 'S' depending on the +
+
+ LAT_DIR / LON_DIR + LAT_DIR returns the single character 'N' or 'S' depending on the hemisphere of the latitude. LON_DIR returns 'E' or 'W' depending on the hemisphere of the longitude. -
- -
-LAT_HUMAN_READABLE - - LAT_HUMAN_READABLE defines LATITUDE in a human-readable format. This - format is probably the most expressive format. It is similar to +
+
+ LAT_HUMAN_READABLE + LAT_HUMAN_READABLE defines LATITUDE in a human-readable format. This + format is probably the most expressive format. It is similar to LAT_DECIMALDIR in that it requires multiple printf conversions, but it is far more flexible as to the contents of those conversions. On read, the printf conversions are ignored and GPSBabel attempts to determine the latitude and longitude based on what is in the file. - -examples: + examples: - - # (writes N 31 40.000) - IFIELD LAT_HUMAN_READABLE,"","%c %d %f" - # (writes "31 deg 40.000 min N") - IFIELD LAT_HUMAN_READABLE,"","%d deg %f min %c" - # Note that this string will confuse the reading routine due - # to the letter "n" in "min" and the letter "e" in "deg." + # (writes N 31 40.000) + IFIELD LAT_HUMAN_READABLE,"","%c %d %f" + # (writes "31 deg 40.000 min N") + IFIELD LAT_HUMAN_READABLE,"","%d deg %f min %c" + # Note that this string will confuse the reading routine due + # to the letter "n" in "min" and the letter "e" in "deg." # (writes 31 40 00.000N) - IFIELD LAT_HUMAN_READABLE,"","%d %d %f%c" + IFIELD LAT_HUMAN_READABLE,"","%d %d %f%c" -
- -
-MAP_EN_BNG - - MAP_EN_BNG converts coordinates from/to British National Grid (BNG). +
+
+ MAP_EN_BNG + MAP_EN_BNG converts coordinates from/to British National Grid (BNG). - - The only supported order of the items is: Map,Easting,Northing. + The only supported order of the items is: Map,Easting,Northing. During output all coordinates have to be located within this limited area. - -examples: + examples: - - IFIELD MAP_EN_BNG,"","%s%5d %5d" # (writes i.e. "SJ00001 00001") - IFIELD MAP_EN_BNG,"","%s %d %d" # (writes i.e. "TQ 888 999") + IFIELD MAP_EN_BNG,"","%s%5d %5d" # (writes i.e. "SJ00001 00001") + IFIELD MAP_EN_BNG,"","%s %d %d" # (writes i.e. "TQ 888 999") -
- -
-LON_HUMAN_READABLE - - See LAT_HUMAN_READABLE except LON_HUMAN_READABLE defines LONGITUDE. +
+
+ LON_HUMAN_READABLE + See LAT_HUMAN_READABLE except LON_HUMAN_READABLE defines LONGITUDE. -
- -
-LATLON_HUMAN_READABLE - - LATLON_HUMAN_READABLE is like LAT_HUMAN_READABLE and LON_HUMAN_READABLE - except that it reads and writes both latitude and longitude as a single +
+
+ LATLON_HUMAN_READABLE + LATLON_HUMAN_READABLE is like LAT_HUMAN_READABLE and LON_HUMAN_READABLE + except that it reads and writes both latitude and longitude as a single field. On write, the same format specifier is used for both coordinates. - On read, GPSBabel does exactly the same thing it does for + On read, GPSBabel does exactly the same thing it does for LAT_HUMAN_READABLE or LON_HUMAN_READABLE. - -example: + example: - IFIELD LATLON_HUMAN_READABLE,"","%c %d %f" - # (writes "N 31 40.126 W 85 09.62" as a single field) + IFIELD LATLON_HUMAN_READABLE,"","%c %d %f" + # (writes "N 31 40.126 W 85 09.62" as a single field) -
- -
-LAT_NMEA - - Defines the latitude in the format used by the NMEA standard which is +
+
+ LAT_NMEA + Defines the latitude in the format used by the NMEA standard which is degrees multiplied by 100 plus decimal minutes. - -example: + example: - IFIELD LAT_NMEA, "%f", "%08.3f" # (writes 3558.322) + IFIELD LAT_NMEA, "%f", "%08.3f" # (writes 3558.322) -
- -
-LAT_DDMMDIR - -Derived from the LAT_NMEA latitude format, with degrees * 100 plus decimal -minutes, but using an additional specifier to position the 'N' or 'S' instead of a leading minus sign (or +
+
+ LAT_DDMMDIR + Derived from the LAT_NMEA latitude format, with degrees * 100 plus decimal +minutes, but using an additional specifier to position the 'N' or 'S' instead of a leading minus sign (or absence thereof) to give direction from zero. - - IFIELD LAT_DDMMDIR, "%f", "%08.3f%c" # (writes "5334.192S" giving -53.56987 degrees latitude) + + IFIELD LAT_DDMMDIR, "%f", "%08.3f%c" # (writes "5334.192S" giving -53.56987 degrees latitude) - -
- - - - -
-LON_NMEA - - Defines the longitude in the format used by the NMEA standard which is + +
+
+ LON_NMEA + Defines the longitude in the format used by the NMEA standard which is degrees multiplied by 100 plus decimal minutes. - -Example: + Example: - IFIELD LON_NMEA, "%f", "%010.3f" # (writes -08708.082) + IFIELD LON_NMEA, "%f", "%010.3f" # (writes -08708.082) -
- -
-LON_DDMMDIR - -Derived from the LON_NMEA longitude format, with degrees * 100 plus decimal minutes, but using an additional character format character to position the +
+
+ LON_DDMMDIR + Derived from the LON_NMEA longitude format, with degrees * 100 plus decimal minutes, but using an additional character format character to position the 'E' or 'W' instead of a leading minus sign (or absence thereof) to give direction from zero. - -Example: + Example: - IFIELD LON_DDMMDIR, "%f", "%010.3f%c" # (writes "01232.745W" giving -12.54575 degrees + IFIELD LON_DDMMDIR, "%f", "%010.3f%c" # (writes "01232.745W" giving -12.54575 degrees longitude) -
- - -
-LAT_10EX / LON_10EX - - Defines the latitude or longitude in the format used i.e. by TomTom Navigator +
+
+ LAT_10EX / LON_10EX + Defines the latitude or longitude in the format used i.e. by TomTom Navigator itinerary files. It is degrees multiplied by 10 power X. X have to be replaced with a valid decimal value. A factor of 10000 would be generated by LAT_10E5 as shown in the examples below. - -examples: + examples: - IFIELD LAT_10E5, "%f", "%.f" # (writes 3558322) + IFIELD LAT_10E5, "%f", "%.f" # (writes 3558322) - IFIELD LON_10E5, "%f", "%.f" # (writes -8708082) + IFIELD LON_10E5, "%f", "%.f" # (writes -8708082) -
- -
-UTM -A location in UTM has several components: a zone, a northing, and an easting. The UTM format specifier is the most common representation of these. +
+
+ UTM + A location in UTM has several components: a zone, a northing, and an easting. The UTM format specifier is the most common representation of these. -example: - -IFIELD UTM, "", "%s" # writes 6S 519045 3984035 -the easting is first by convention. -
- -
-UTM_EASTING -This is the decimal component representing the easting + example: + IFIELD UTM, "", "%s" # writes 6S 519045 3984035 -the easting is first by convention. +
+
+ UTM_EASTING + This is the decimal component representing the easting -example: - -IFIELD UTM_EASTING, "", "%.0f" # outputs 519045 + example: + IFIELD UTM_EASTING, "", "%.0f" # outputs 519045 -
- -
-UTM_NORTHING - -This is the decimal component representing the northing +
+
+ UTM_NORTHING + This is the decimal component representing the northing -example: - -IFIELD UTM_NORTHING "", "%.0f" # outputs 3984035 + example: + IFIELD UTM_NORTHING "", "%.0f" # outputs 3984035 -
- -
-UTM_ZONE -The UTM zone. +
+
+ UTM_ZONE + The UTM zone. -example: - -IFIELD UTM_ZONE "", "%d" # outputs 6 + example: + IFIELD UTM_ZONE "", "%d" # outputs 6 -
- -
-UTM_ZONEC - -The UTM Zone character. +
+
+ UTM_ZONEC + The UTM Zone character. -example: - -IFIELD UTM_ZONEC "", "%c" # outputs S + example: + IFIELD UTM_ZONEC "", "%c" # outputs S -
- -
- - -The full UTM zone and latitude band. +
+
+ + <para>The full UTM zone and latitude band. </para> -<para>example: </para> -<screen format="linespecific"> -IFIELD UTM_ZONEF "", "%d%c" # outputs 6S + <para>example: </para> + <screen format="linespecific">IFIELD UTM_ZONEF "", "%d%c" # outputs 6S </screen> -</section> - - -<section id="style_def_altfeet"> -<title>ALT_FEET - - ALT_FEET is the position's ALTITUDE in FEET. This value is treated as - a SIGNED DOUBLE PRECISION FLOAT and requires a FLOATING POINT printf +
+
+ ALT_FEET + ALT_FEET is the position's ALTITUDE in FEET. This value is treated as + a SIGNED DOUBLE PRECISION FLOAT and requires a FLOATING POINT printf conversion. - -example: + example: - IFIELD ALT_FEET,"","%.0f" + IFIELD ALT_FEET,"","%.0f" -
- -
-ALT_METERS - - ALT_METERS is identical to ALT_FEET with the exception that the altitude +
+
+ ALT_METERS + ALT_METERS is identical to ALT_FEET with the exception that the altitude is in METERS. -
- -
-HEART_RATE - - Heart rate, measured in beats per minute. Only valid for units with +
+
+ HEART_RATE + Heart rate, measured in beats per minute. Only valid for units with heart rate monitor features (i.e. Garmin Forerunner 301). - -example: + example: - IFIELD HEART_RATE,"","%d" + IFIELD HEART_RATE,"","%d" -
- -
-CADENCE - - Cadence in revolutions per minute. Only valid for units with +
+
+ CADENCE + Cadence in revolutions per minute. Only valid for units with heart rate monitor features (i.e. Garmin Edge 305). - -example: + example: - IFIELD CADENCE,"","%d" + IFIELD CADENCE,"","%d" -
- -
-POWER - - Cycling power in Watts. Only valid for units with power meter +
+
+ POWER + Cycling power in Watts. Only valid for units with power meter features (i.e. Garmin Edge 305). - -example: + example: - IFIELD POWER,"","%.1f" + IFIELD POWER,"","%.1f" -
- -
-TEMPERATURE - - Temperature in degrees Celsius. +
+
+ TEMPERATURE + Temperature in degrees Celsius. - -example: + example: - IFIELD TEMPERATURE,"","%.1f" + IFIELD TEMPERATURE,"","%.1f" -
- -
-TEMPERATURE_F - - Temperature in degrees Fahrenheit. +
+
+ TEMPERATURE_F + Temperature in degrees Fahrenheit. - -example: + example: - IFIELD TEMPERATURE_F,"","%.1f" + IFIELD TEMPERATURE_F,"","%.1f" -
- -
-EXCEL_TIME - - EXCEL_TIME is the waypoint's creation time, if any. This is actually +
+
+ EXCEL_TIME + EXCEL_TIME is the waypoint's creation time, if any. This is actually the decimal days since 1/1/1900 and is handled internally as a DOUBLE PRECISION FLOAT and requires a FLOATING POINT printf conversion. - -example: + example: - IFIELD EXCEL_TIME,"","%11.5f" + IFIELD EXCEL_TIME,"","%11.5f" -
- -
-TIMET_TIME - - TIMET_TIME is the waypoint's creation time, if any. This is actually +
+
+ TIMET_TIME + TIMET_TIME is the waypoint's creation time, if any. This is actually the integer seconds since 1/1/1970 (let's not start the holy war) and is handled internally as a LONG INTEGER and requires a LONG INTEGER printf conversion. - -example: + example: - IFIELD TIMET_TIME,"","%ld" + IFIELD TIMET_TIME,"","%ld" -
- -
-TIMET_TIME_MS - - TIMET_TIME_MS is the same as TIMET_TIME, but expressed in milliseconds. +
+
+ TIMET_TIME_MS + TIMET_TIME_MS is the same as TIMET_TIME, but expressed in milliseconds. It too is handled internally as a LONG INTEGER and requires a LONG INTEGER printf conversion. - -example: + example: - IFIELD TIMET_TIME_MS,"","%ld" + IFIELD TIMET_TIME_MS,"","%ld" -
- -
-YYYYMMDD_TIME - - YYYYMMDD_TIME is the waypoint's creation time, if any. It's a single - decimal field containing four digits of year, two digits of month, +
+
+ YYYYMMDD_TIME + YYYYMMDD_TIME is the waypoint's creation time, if any. It's a single + decimal field containing four digits of year, two digits of month, and two digits of date. Internally it is a LONG INTEGER and thus requires a LONG INTEGER printf conversion. - -example: + example: - IFIELD YYYYMMDD_TIME,"","%ld" + IFIELD YYYYMMDD_TIME,"","%ld" -
- -
-GMT_TIME - - GMT_TIME is the waypoint's creation time, in UTC time zone. It uses the - strptime conversion format tags. +
+
+ GMT_TIME + GMT_TIME is the waypoint's creation time, in UTC time zone. It uses the + strptime conversion format tags. - -example: + example: - IFIELD GMT_TIME,"","%m/%d/%Y %I:%M:%D %p" + IFIELD GMT_TIME,"","%m/%d/%Y %I:%M:%D %p" - - Search the web for 'strptime man page' for details strptime, but one + Search the web for 'strptime man page' for details strptime, but one such page can be found at -http://www.die.net/doc/linux/man/man3/strptime.3.html - -
-
-LOCAL_TIME - - LOCAL_TIME is the waypoint's creation time, in the local + + + + + + + http://www.die.net/doc/linux/man/man3/strptime.3.html +
+
+ LOCAL_TIME + LOCAL_TIME is the waypoint's creation time, in the local time zone. It uses strptime conversion format tags. See GMT_TIME for a reference. - -example: + example: - IFIELD LOCAL_TIME,"","%y-%m-%d" + IFIELD LOCAL_TIME,"","%y-%m-%d" -
- -
-HMSG_TIME - - HMSG_TIME parses up to three time parts and am/pm string to add - this value to the previously parsed *_TIME field that contains +
+
+ HMSG_TIME + HMSG_TIME parses up to three time parts and am/pm string to add + this value to the previously parsed *_TIME field that contains only a date. On output, will print the time in UTC. - -example: + example: - IFIELD HMSG_TIME,"","%d:%d:%d %s" + IFIELD HMSG_TIME,"","%d:%d:%d %s" -
- -
-HMSL_TIME - - HMSG_TIME parses up to three time parts and am/pm string to add - this value to the previously parsed *_TIME field that contains +
+
+ HMSL_TIME + HMSG_TIME parses up to three time parts and am/pm string to add + this value to the previously parsed *_TIME field that contains only a date. On output, will print the time in local time. - -example: + example: - IFIELD HMSL_TIME,"","%dh%dm" + IFIELD HMSL_TIME,"","%dh%dm" -
- -
-ISO_TIME - - ISO_TIME is the waypoint's creation time, in ISO 8601 format, - which include time zone information. +
+
+ ISO_TIME + ISO_TIME is the waypoint's creation time, in ISO 8601 format, + which include time zone information. It is expected to be in the format yyyy-mm-ddThh:mm:sszzzzz where zzzzzz is the local time offset or the character Z for UTC time. On output, UTC 'Z' time zone will always be used. - -example: + example: - IFIELD ISO_TIME,"","%s" + IFIELD ISO_TIME,"","%s" -
- -
-ISO_TIME_MS - - ISO_TIME_MS is much like ISO_TIME, but expresses milliseconds at the +
+
+ ISO_TIME_MS + ISO_TIME_MS is much like ISO_TIME, but expresses milliseconds at the end of the timestamp. It is thus in the format yyyy-mm-ddThh:mm:ss.SSSzzzzz - where 'SSS' is milliseconds and zzzzzz is the local time offset + where 'SSS' is milliseconds and zzzzzz is the local time offset or the character Z for UTC time. On output, UTC 'Z' time zone will always be used. - -example: + example: - IFIELD ISO_TIME_MS,"","%s" + IFIELD ISO_TIME_MS,"","%s" -
- -
-NET_TIME - - Microsoft dot net represents times in 100 nanosecond intervals since midnight - Jan 1/0001 GMT, giving absurdly large numbers like 633943150010000000 for +
+
+ NET_TIME + Microsoft dot net represents times in 100 nanosecond intervals since midnight + Jan 1/0001 GMT, giving absurdly large numbers like 633943150010000000 for mid-November, 2009. NET_TIME is how to represent those in GPSBabel. - -example: + example: - IFIELD NET_TIME,"","%f" + IFIELD NET_TIME,"","%f" -
- -
-GEOCACHE_DIFF - - GEOCACHE_DIFF is valid only for geocaches and represents a DOUBLE - PRECISION FLOAT. This is the geocache "difficulty" rating as defined by - Groundspeak. A "three and a half star" cache would therefore be "3.5" +
+
+ GEOCACHE_DIFF + GEOCACHE_DIFF is valid only for geocaches and represents a DOUBLE + PRECISION FLOAT. This is the geocache "difficulty" rating as defined by + Groundspeak. A "three and a half star" cache would therefore be "3.5" - -example: + example: - IFIELD GEOCACHE_DIFF,"","%3.1f" + IFIELD GEOCACHE_DIFF,"","%3.1f" -
- -
-GEOCACHE_TERR - - GEOCACHE_TERR is valid only for geocaches and represents a DOUBLE - PRECISION FLOAT. This is the geocache "terrain" rating as defined - by Groundspeak. A "three and a half star" cache would therefore be "3.5" +
+
+ GEOCACHE_TERR + GEOCACHE_TERR is valid only for geocaches and represents a DOUBLE + PRECISION FLOAT. This is the geocache "terrain" rating as defined + by Groundspeak. A "three and a half star" cache would therefore be "3.5" - -example: + example: - IFIELD GEOCACHE_TERR,"","%3.1f" + IFIELD GEOCACHE_TERR,"","%3.1f" -
- -
-GEOCACHE_CONTAINER - - GEOCACHE_CONTAINER is valid only for geocaches and is heavily influenced - by the Groundspeak container types. Examples would include "Micro" - and "Virtual". +
+
+ GEOCACHE_CONTAINER + GEOCACHE_CONTAINER is valid only for geocaches and is heavily influenced + by the Groundspeak container types. Examples would include "Micro" + and "Virtual". - -example: + example: - GEOCACHE_CONTAINER,"","%s" + GEOCACHE_CONTAINER,"","%s" -
- -
-GEOCACHE_TYPE - - GEOCACHE_TYPE is valid only for geocaches and is heavily influenced - by the Groundspeak cache types. Examples would include "Event cache" - and "Multi-Cache". +
+
+ GEOCACHE_TYPE + GEOCACHE_TYPE is valid only for geocaches and is heavily influenced + by the Groundspeak cache types. Examples would include "Event cache" + and "Multi-Cache". - -example: + example: - GEOCACHE_TYPE,"","%s" + GEOCACHE_TYPE,"","%s" -
- -
-GEOCACHE_PLACER - - GEOCACHE_PLACER is a string containing the name of the placer of a - geocache. +
+
+ GEOCACHE_PLACER + GEOCACHE_PLACER is a string containing the name of the placer of a + geocache. - -example: + example: - GEOCACHE_PLACER,"","%s" + GEOCACHE_PLACER,"","%s" -
- -
-GEOCACHE_ISAVAILABLE - - GEOCACHE_ISAVAILABLE is a string containing "True" or "False" - indicating whether a geocache is currently available or not. +
+
+ GEOCACHE_ISAVAILABLE + GEOCACHE_ISAVAILABLE is a string containing "True" or "False" + indicating whether a geocache is currently available or not. - -example: + example: - GEOCACHE_ISAVAILABLE,"","%s" + GEOCACHE_ISAVAILABLE,"","%s" -
- -
-GEOCACHE_ISARCHIVED - - GEOCACHE_ISARCHIVED is a string containing "True" or "False" - indicating whether a geocache has been archived. +
+
+ GEOCACHE_ISARCHIVED + GEOCACHE_ISARCHIVED is a string containing "True" or "False" + indicating whether a geocache has been archived. - -example: + example: - GEOCACHE_ISARCHIVED,"","%s" + GEOCACHE_ISARCHIVED,"","%s" -
- -
-GEOCACHE_LAST_FOUND - - A long integer in format YYYYMMDD containing the last time this geocache +
+
+ GEOCACHE_LAST_FOUND + A long integer in format YYYYMMDD containing the last time this geocache was found. - -example: + example: - GEOCACHE_LAST_FOUND,"","%ld" + GEOCACHE_LAST_FOUND,"","%ld" -
- -
-GEOCACHE_HINT - - The hint for this geocache. No additional transformation (such as rot13) +
+
+ GEOCACHE_HINT + The hint for this geocache. No additional transformation (such as rot13) will be performed on this string. - -example: + example: - GEOCACHE_HINT,"","%s" + GEOCACHE_HINT,"","%s" -
- -
-PATH_DISTANCE_MILES - - PATH_DISTANCE_MILES outputs the total length of the route or track from +
+
+ PATH_DISTANCE_MILES + PATH_DISTANCE_MILES outputs the total length of the route or track from the start point to the current point, in miles. This and the altitude could be used to create an elevation profile. PATH_DISTANCE_MILES is a DOUBLE PRECISION FLOAT. - - PATH_DISTANCE_MILES is not valid as an input field. + PATH_DISTANCE_MILES is not valid as an input field. - - PATH_DISTANCE_MILES is only meaningful if the data comes from a track + PATH_DISTANCE_MILES is only meaningful if the data comes from a track or a route; waypoint data will generate essentially meaningless output. - -example: + example: - PATH_DISTANCE_MILES,"","%f" + PATH_DISTANCE_MILES,"","%f" -
- -
-PATH_DISTANCE_KM - - PATH_DISTANCE_KM is like PATH_DISTANCE_MILES except it outputs the - length in kilometers. +
+
+ PATH_DISTANCE_KM + PATH_DISTANCE_KM is like PATH_DISTANCE_MILES except it outputs the + length in kilometers. -
- -
-PATH_DISTANCE_METERS - - PATH_DISTANCE_METERS is like PATH_DISTANCE_MILES except it outputs the - length in meters. +
+
+ PATH_DISTANCE_METERS + PATH_DISTANCE_METERS is like PATH_DISTANCE_MILES except it outputs the + length in meters. -
- -
-PATH_SPEED - - Speed in meters per second. GPSBabel does NOT calculate this data by +
+
+ PATH_SPEED + Speed in meters per second. GPSBabel does NOT calculate this data by default; it is read from the input file if present. (If not present, - it may be calculated with the track - filter.) - - -example: + it may be calculated with the + + + + + + + track + filter.) + example: - PATH_SPEED,"","%f" + PATH_SPEED,"","%f" -
- -
-PATH_SPEED_KPH - - Like PATH_SPEED but means kilometers per hour. +
+
+ PATH_SPEED_KPH + Like PATH_SPEED but means kilometers per hour. - -example: + example: - PATH_SPEED_KPH,"","%.1f" + PATH_SPEED_KPH,"","%.1f" -
- -
-PATH_SPEED_MPH - - Like PATH_SPEED but means miles per hour. +
+
+ PATH_SPEED_MPH + Like PATH_SPEED but means miles per hour. - -example: + example: - PATH_SPEED_MPH,"","%.1f" + PATH_SPEED_MPH,"","%.1f" -
- -
-PATH_SPEED_KNOTS - - Like PATH_SPEED but means knots (nautical). +
+
+ PATH_SPEED_KNOTS + Like PATH_SPEED but means knots (nautical). - -example: + example: - PATH_SPEED_KNOTS,"","%.1f" + PATH_SPEED_KNOTS,"","%.1f" -
- -
-PATH_COURSE - - Course in degrees. GPSBabel does not calculate this data by default; +
+
+ PATH_COURSE + Course in degrees. GPSBabel does not calculate this data by default; it is read from the input file if present. (If not present, it may be - calculated with the track filter.) - - -example: + calculated with the + + + + + + + track + filter.) + example: - PATH_COURSE,"","%f" + PATH_COURSE,"","%f" -
- -
-GPS_HDOP / GPS_VDOP / GPS_PDOP - - GPS horizontal / vertical / positional dilution of precision +
+
+ GPS_HDOP / GPS_VDOP / GPS_PDOP + GPS horizontal / vertical / positional dilution of precision parameters. Needs float conversion. - -example: + example: - GPS_HDOP,"","%f" + GPS_HDOP,"","%f" -
- -
-GPS_SAT - - Number of satellites used for determination of the position. Needs +
+
+ GPS_SAT + Number of satellites used for determination of the position. Needs integer conversion. - -example: - - GPS_SAT,"","%d" - -
- -
-GPS_FIX - - Type of fix (see GPX spec or track -filter). Needs string conversion. - - -example: - - GPS_FIX,"","%s" - -
- -
-TRACK_NEW -If '1', it indicates that this trackpoint is the first point of a new track. Needs integer conversion.example:IFIELD TRACK_NEW,"","%d"
- - -
-TRACK_NAME -The name of the track currently being operated on. Needs string conversion.example:TRACK_NAME, "", "%s"
- -
-ROUTE_NAME -The name of the route currently being operated on. Needs string conversion.example:ROUTE_NAME, "", "%s"
- -
-STREET_ADDR -Street address including house number. Notice that this is not used for any geocoding, it's merely textual description associated with a position. -example:STREET_ADDR, "", "%s" -
- -
-CITY -The name of a city. Sometimes part of "Points of Interest". This is simple textual data associated with a position, no geocoding will be done.. -example:CITY, "", "%s" -
- -
-COUNTRY -The name of a country associated with a position. -example:COUNTRY, "", "%s" -
- -
-FACILITY -The name of a facility to associate with a position. -example:FACILITY, "", "%s" -
- -
-PHONE_NR -A phone number associated with a position. This is just textual data attached for convenience. -example:PHONE_NR, "", "%s" -
- -
-POSTAL_CODE -A postal code to associate with a position. It is freeform text and is not used by GPSBabel for any geocoding or such. -example:POSTAL_CODE, "", "%s" -
- -
-FILENAME -The name of the input file from where the points were loaded. This field is available only on output. -example:OFIELD FILENAME, "", "%s" -
- -
-FORMAT -The name of the input format from where format the points came. This field is available only on output. -example:OFIELD FORMAT, "", "%s" -
- -
- -
-Examples - -Here is one example style file from the GPSBabel source. - -# gpsbabel XCSV style file + example: + + GPS_SAT,"","%d" + +
+
+ GPS_FIX + Type of fix (see GPX spec or + + + + + + + track + filter). Needs string conversion. + example: + + GPS_FIX,"","%s" + +
+
+ TRACK_NEW + If '1', it indicates that this trackpoint is the first point of a new track. Needs integer conversion. + example: + + + + + + + IFIELD TRACK_NEW,"","%d" +
+
+ TRACK_NAME + The name of the track currently being operated on. Needs string conversion. + example: + + + + + + + TRACK_NAME, "", "%s" +
+
+ ROUTE_NAME + The name of the route currently being operated on. Needs string conversion. + example: + ROUTE_NAME, "", "%s" +
+
+ STREET_ADDR + Street address including house number. Notice that this is not used for any geocoding, it's merely textual description associated with a position. + example: + + STREET_ADDR, "", "%s" +
+
+ CITY + The name of a city. Sometimes part of "Points of Interest". This is simple textual data associated with a position, no geocoding will be done.. + example: + CITY, "", "%s" +
+
+ COUNTRY + The name of a country associated with a position. + example: + + + + + + + COUNTRY, "", "%s" +
+
+ FACILITY + The name of a facility to associate with a position. + example: + + + + + + + FACILITY, "", "%s" +
+
+ PHONE_NR + A phone number associated with a position. This is just textual data attached for convenience. + example: + + + + + + + PHONE_NR, "", "%s" +
+
+ POSTAL_CODE + A postal code to associate with a position. It is freeform text and is not used by GPSBabel for any geocoding or such. + example: + + + + + + + POSTAL_CODE, "", "%s" +
+
+ FILENAME + The name of the input file from where the points were loaded. This field is available only on output. + example: + + + + + + + OFIELD FILENAME, "", "%s" +
+
+ FORMAT + The name of the input format from where format the points came. This field is available only on output. + example: + + + + + + + OFIELD FORMAT, "", "%s" +
+
+ +
+ Examples + Here is one example style file from the GPSBabel source. + + + + + + + + # gpsbabel XCSV style file # # Format: Garmin POI # Author: Robert Lipe @@ -1447,48 +1300,56 @@ SHORTLEN 24 # # INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE: # -IFIELD LON_HUMAN_READABLE, "", "%08.5f" -IFIELD LAT_HUMAN_READABLE, "", "%08.5f" -IFIELD SHORTNAME, "", "%s" -IFIELD DESCRIPTION, "", "%s" - -OFIELD LON_DECIMAL, "", "%08.5f" -OFIELD LAT_DECIMAL, "", "%08.5f" -OFIELD SHORTNAME, "", "%-.24s" -OFIELD GEOCACHE_TYPE, "", " %-.4s", "no_delim_before,optional" -OFIELD GEOCACHE_CONTAINER, "", "/%-.4s ", "no_delim_before,optional" -OFIELD GEOCACHE_DIFF, "", "(%3.1f", "no_delim_before,optional" -OFIELD GEOCACHE_TERR, "", "/%3.1f)", "no_delim_before,optional" -OFIELD DESCRIPTION, "", "%-.50s" +IFIELD LON_HUMAN_READABLE, "", "%08.5f" +IFIELD LAT_HUMAN_READABLE, "", "%08.5f" +IFIELD SHORTNAME, "", "%s" +IFIELD DESCRIPTION, "", "%s" + +OFIELD LON_DECIMAL, "", "%08.5f" +OFIELD LAT_DECIMAL, "", "%08.5f" +OFIELD SHORTNAME, "", "%-.24s" +OFIELD GEOCACHE_TYPE, "", " %-.4s", "no_delim_before,optional" +OFIELD GEOCACHE_CONTAINER, "", "/%-.4s ", "no_delim_before,optional" +OFIELD GEOCACHE_DIFF, "", "(%3.1f", "no_delim_before,optional" +OFIELD GEOCACHE_TERR, "", "/%3.1f)", "no_delim_before,optional" +OFIELD DESCRIPTION, "", "%-.50s" -When used on a Groundspeak Pocket Query, it will output lines that + When used on a Groundspeak Pocket Query, it will output lines that look like: - --76.76234,38.39123,GC5370 Loca/Virt (1.0/1.0),Dude.. Wheres my Limo?? + + + -76.76234,38.39123,GC5370 Loca/Virt (1.0/1.0),Dude.. Wheres my Limo?? -90.42345,38.55234,GCC8B Trad/Regu (2.0/2.0),Sweet Reward -90.81456,38.62456,GC3091 Trad/Regu (1.5/2.0),Matson Hill -that are suitable for Garmin's POI loader. - - -For additional examples, please see the -*.style files in the -style/ subdirectory of the GPSBabel source tree or at the online source.. - -
+ that are suitable for Garmin's POI loader.
+ For additional examples, please see the -
-Miscellaneous Notes -
-Default Values - -Default values are supported for any output fields that contain pure + + *.style + files in the + + + style/ + subdirectory of the GPSBabel source tree or at the + + + online source. + . +
+ +
+ Miscellaneous Notes +
+ Default Values + Default values are supported for any output fields that contain pure character data output such as URL and NOTES. Default values are only - written on output and are not used to supplement missing input. When - using default values your mileage will vary greatly depending on the + written on output and are not used to supplement missing input. When + using default values your mileage will vary greatly depending on the input formats used to populate waypoint data. -
-
- - +
+
+ +
+ \ No newline at end of file diff --git a/xmldoc/chapters/use.xml b/xmldoc/chapters/use.xml index 9ef5b0698..8dea30b79 100644 --- a/xmldoc/chapters/use.xml +++ b/xmldoc/chapters/use.xml @@ -1,211 +1,267 @@ - - Usage - - Invocation - -If you're using GPSBabel, you will need to know how to do at least two things: + + Usage + + Invocation + If you're using GPSBabel, you will need to know how to do at least two things: read data from a file, and write it to another file. There are four basic options you need to know to do those things: - - -Command -Meaning - - format - Set input format - - - filename - Read file - - - format - Set output format - - - filename - Write output file - - - - -Case matters. Notably (lowercase) sets the input file. (uppercase) sets the output file. - - - - -The format parameters in the above list -refer to the names of formats or file types supported by GPSBabel. - -gpsbabel -? -will always show you the supported file types. In this document, the -various supported formats are listed in . The -name that you would use on the command line follows the format name in -parentheses. - - -Options are always processed in order from left to right. + + + Command + Meaning + + + + format + + Set input format + + + + + filename + + Read file + + + + + format + + Set output format + + + + + filename + + Write output file + + + + Case matters. Notably + + (lowercase) sets the + input + file. + + (uppercase) sets the + output + file. + + The + format + parameters in the above list +refer to the names of formats or file types supported by GPSBabel. + + gpsbabel -? + + will always show you the supported file types. In this document, the +various supported formats are listed in + + . The +name that you would use on the command line follows the format name in +parentheses. + Options are + always + processed in order from left to right. In practical terms, this means that things you want to read should appear in the command before things you want to write. This sometimes surprises -new users as adding options to turn on debugging at the end, for example, +new users as adding options to turn on debugging at the end, for example, doesn't work as the debugging is turned on after all the interesting work is done. The reason for this strict ordering becomes more apparent once you -learn about mixing formats and filters. - - -The filename parameters specify the -name of a file to be read or written. - - -To use +learn about mixing formats and filters. + The + filename + parameters specify the +name of a file to be read or written. + To use GPSBabel in its simplest form, just tell it what you're reading, where to read it from, what you're writing, and what to write it to. For example: - gpsbabel -i geo -f /tmp/geocaching.loc -o gpx -F /tmp/geocaching.gpx - tells it to read the file /tmp/geocaching.loc in geocaching.com - format and create a new file /tmp/geocaching.gpx in GPX format. It's important to note that the names have nothing to do with the formats actually used. - This command will read from a Magellan unit attached + + gpsbabel -i geo -f /tmp/geocaching.loc -o gpx -F /tmp/geocaching.gpx + + tells it to read the file + /tmp/geocaching.loc + in geocaching.com + format and create a new file + /tmp/geocaching.gpx + in GPX format. It's important to note that the names have nothing to do with the formats actually used. + This command will read from a Magellan unit attached to the first serial port on a Linux system (device names will vary on other OSes; typically COMx: on Windows) and write them as a geocaching loc file. - - Command showing Linux download from Magellan serial and writing to .loc file - gpsbabel -i magellan -f /dev/ttyS0 -o geo -F mag.loc - - This second command does the same on Microsoft Windows. - - Command showing Windows download from Magellan serial and writing to .loc file - gpsbabel -i magellan -f com1 -o geo -F mag.loc - - Optionally, you may specify -s in any command line. This - causes the program to ignore any "short" names that may be + + Command showing Linux download from Magellan serial and writing to .loc file + + gpsbabel -i magellan -f /dev/ttyS0 -o geo -F mag.loc + + + This second command does the same on Microsoft Windows. + + Command showing Windows download from Magellan serial and writing to .loc file + + gpsbabel -i magellan -f com1 -o geo -F mag.loc + + + Optionally, you may specify + -s + in any command line. This + causes the program to ignore any "short" names that may be present in the source data format and synthesize one from the long name. This is particularly useful if you're writing to a target format that isn't the lowest common denominator but the source data was written for the lowest common denominator. This is useful for writing data from geocaching.com - to a GPS so my waypoints have "real" names instead of - the 'GC1234' ones that are optimized for receivers of the lowest - common denominator. + to a GPS so my waypoints have "real" names instead of + the 'GC1234' ones that are optimized for receivers of the lowest + common denominator. A geocacher using Linux with a Magellan receiver may thus find commands like this useful. - gpsbabel -s -i geo -f geocaching.loc -o magellan -F /dev/ttyS0 - His counterpart on Windows will find this equivalent - gpsbabel -s -i geo -f geocaching.loc -o magellan -F com1 - - - Suboptions - - Many of the available format options in GPSBabel can themselves - take options. While we try to make all the formats do the most - sensible thing possible without any extra options; this allows - great power and flexibility in the operation of the program. - - - Suboptions are comma separated and immediately follow the option - itself. The available suboptions are listed on the individual - format pages. We'll make an example from : - - gpsbabel -i gpx -f file.gpx -o kml,deficon="file://myicon.png",lines=0 -F one.kml -o kml -F two.kml - - This command will read the GPX file file.gpx - and create two KML files. one.kml will - have the given icon and no lines between track and routepoints. - two.kml will be created with the defaults used - in the KML writer. - - - Suboptions for the various formats allow you to change serial speeds, - pass arguments to filters, change the type of file written, override - icon defaults, and lots of other things. The suboptions for each - filetype are documented on the page in this document that describes - the option itself. - - - - Advanced Usage - Argument are processed in the order they appear on the command + + gpsbabel -s -i geo -f geocaching.loc -o magellan -F /dev/ttyS0 + + His counterpart on Windows will find this equivalent + + gpsbabel -s -i geo -f geocaching.loc -o magellan -F com1 + + + + Suboptions + Many of the available format options in GPSBabel can themselves + take options. While we try to make all the formats do the most + sensible thing possible without any extra options; this allows + great power and flexibility in the operation of the program. + + Suboptions are comma separated and immediately follow the option + itself. The available suboptions are listed on the individual + format pages. We'll make an example from + + : + + gpsbabel -i gpx -f file.gpx -o kml,deficon="file://myicon.png",lines=0 -F one.kml -o kml -F two.kml + + This command will read the GPX file + file.gpx + and create two KML files. + one.kml + will + have the given icon and no lines between track and routepoints. + + two.kml + will be created with the defaults used + in the KML writer. + Suboptions for the various formats allow you to change serial speeds, + pass arguments to filters, change the type of file written, override + icon defaults, and lots of other things. The suboptions for each + filetype are documented on the page in this document that describes + the option itself. + + + + Advanced Usage + Argument are processed in the order they appear on the command line and are translated internally into a pipeline that data flows through when executed. Normally one would: - - read from one input - optionally apply filters - write into one output - - but GPSBabel is flexible enough to allow more complicated + + read from one input + optionally apply filters + write into one output + + but GPSBabel is flexible enough to allow more complicated operations such as reading from several files (potentially of different types), applying a filter, reading more data, then writing the merged data to multiple destinations. - The input file type remains unchanged until a new - -i argument is seen. + The input file type remains unchanged until a new + + -i + argument is seen. Files are read in the order they appear. So you could merge three input files into one output file with: - - Merging multiple files into one - gpsbabel -i geo -f 1.loc -f 2.loc -f 3.loc -o geo -F big.loc - - You can merge files of different types: - - Merging multiple files of differing types. - gpsbabel -i geo -f 1.loc -i gpx -f 2.gpx -i pcx 3.pcx -o gpsutil -F big.gps - - - Writing the same data in multiple output formats. - You can write the same data in different output formats: - - gpsbabel -i geo -f 1.loc -o gpx -F 1.gpx -o pcx -F 1.wpt - - - - Route and Track Modes - Most formats supported by GPSBabel will make a reasonable attempt to work + + Merging multiple files into one + + gpsbabel -i geo -f 1.loc -f 2.loc -f 3.loc -o geo -F big.loc + + + You can merge files of different types: + + Merging multiple files of differing types. + + gpsbabel -i geo -f 1.loc -i gpx -f 2.gpx -i pcx 3.pcx -o gpsutil -F big.gps + + + + Writing the same data in multiple output formats. + You can write the same data in different output formats: + + gpsbabel -i geo -f 1.loc -o gpx -F 1.gpx -o pcx -F 1.wpt + + + + + Route and Track Modes + Most formats supported by GPSBabel will make a reasonable attempt to work transparently with waypoints, tracks, and routes. Some - formats, like garmin and magellan require the -t flag to work with tracks and - -r to work with - routes. -w is for + formats, like + garmin + and + magellan + require the + -t + flag to work with tracks and + + -r + to work with + routes. + -w + is for waypoints, and is the default. So if you wanted to read all data from a Magellan Meridian GPS receiver into a gpx file, you might use a command like: - gpsbabel -t -r -w -i magellan -f com1: -o gpx -F backup.gpx - Tracks and routes are advanced features and don't try + + gpsbabel -t -r -w -i magellan -f com1: -o gpx -F backup.gpx + + Tracks and routes are advanced features and don't try to handle every possible hazard that can be encountered during a conversion. If you're merging or converting files of similar limitations, things work very well. - Many of those hazards can be overcome with our filters - but there are often compromises to be made. For example, if you - have a GPX route that contains 150 turn points but you're sending - the route to a GPS receiver that supports only 30 turnpoints, something has - to go. One might use our 'simplify' filter to produce a route that - retained the 30 most mathematically significant turnpoints but that - may not really be the route you had in mind. - - Tracks and routes will sometimes be converted to a + Many of those hazards can be overcome with our filters + but there are often compromises to be made. For example, if you + have a GPX route that contains 150 turn points but you're sending + the route to a GPS receiver that supports only 30 turnpoints, something has + to go. One might use our 'simplify' filter to produce a route that + retained the 30 most mathematically significant turnpoints but that + may not really be the route you had in mind. + + Tracks and routes will sometimes be converted to a list of waypoints when necessary, One example is when writing into one of the CSV formats. The inverse operation is not supported right now, so reading the converted track back from CSV will always result in a list of waypoints, not the original track. - The presence of -s on the command line tends to + The presence of + -s + on the command line tends to create havoc on tracks and routes since many of these formats rely on internal linkages between such points and renaming them may break those linkages. In general, don't use - -s when tracks or - routes are present. - - - - Working with predefined options - - GPSBabel can read a file on startup to set defaults for options. All - module and filter options may be set this way. - - - The format of the file is identical to the inifile-format often seen - on Windows. Here is an example: + -s + when tracks or + routes are present. + + + Working with predefined options + GPSBabel can read a file on startup to set defaults for options. All + module and filter options may be set this way. + + The format of the file is identical to the inifile-format often seen + on Windows. Here is an example: - [Common format settings] @@ -221,150 +277,186 @@ merged data to multiple destinations. 1=fixed waypoints 2=temporary waypoints - - Each section of the file starts with a '[section]' header followed by any + Each section of the file starts with a '[section]' header followed by any number of lines formatted option=value. Leading and trailing whitespace - will be - automatically removed from header, option and value items. - - Lines starting - with '#' or ';' will be treated as comments and ignored. - + will be + automatically removed from header, option and value items. - - There are three optional sections. - - - Common format settings. - Any option from any of the formats listed here will be used by - GPSBabel unless explicitly provided on the command line. - - - - Common filter settings. - As above, but for filters. - - - Garmin categories - This allows you to give readable names to the numeric categories - used internally in some Garmin devices and the Mapsource formats - such as GDB and MPS. This is information is also used by our GPX - and garmin_txt formats as well. - + + Lines starting + with '#' or ';' will be treated as comments and ignored. + There are three optional sections. + + + + Common format settings. + Any option from any of the formats listed here will be used by + GPSBabel unless explicitly provided on the command line. + + + Common filter settings. + As above, but for filters. + + + Garmin categories + This allows you to give readable names to the numeric categories + used internally in some Garmin devices and the Mapsource formats + such as GDB and MPS. This is information is also used by our GPX + and garmin_txt formats as well. + + By default, GPSBabel tries at startup to load the file named - - By default, GPSBabel tries at startup to load the file named - gpsbabel.ini from the following locations: - + gpsbabel.ini + from the following locations: - current working directory - Windows: all paths "APPDATA", "WINDIR", "SYSTEMROOT" declared in environment. - Unix like OS'ses: ${HOME}/.gpsbabel/, /usr/local/etc/ and /etc/ + + current working directory + + + Windows: all paths "APPDATA", "WINDIR", "SYSTEMROOT" declared in environment. + + + Unix like OS'ses: + ${HOME}/.gpsbabel/ + , + /usr/local/etc/ + and + /etc/ + - - If the option is specified, the above locations are not searched. - Only the filename specified by that option will be used. - - - There may be situations where predefined values are not usable - (i.e. wrapper applications using GPSBabel in the background). + If the + + option is specified, the above locations are not searched. + Only the filename specified by that option will be used. + There may be situations where predefined values are not usable + (i.e. wrapper applications using GPSBabel in the background). The inifile mechanism can be disabled with an empty filename. - gpsbabel -p "" -i gpx -f something.gpx -o tiger -F - - - - Realtime tracking - - Introduced in GPSBabel 1.3.1, we now have an experimental feature for realtime tracking via the new option. This reads position reports from selected formats and writes an output file when a position report is received. - - As of this writing, Garmin's PVT - protocol and - NMEA are supported - inputs. KML, NMEA, and the various XCSV formats are supported on - output. Additional formats may be added by interested parties - later. + gpsbabel -p "" -i gpx -f something.gpx -o tiger -F - - - Read realtime positioning from Garmin USB, write to Keyhole Markup - gpsbabel -T -i garmin -f usb: -o kml -F xxx.kml - - Will read the USB-connected Garmin and rewrite 'xxx.kml' atomically, + + + Realtime tracking + Introduced in GPSBabel 1.3.1, we now have an + experimental + feature for realtime tracking via the new + + option. This reads position reports from selected formats and writes an output file when a position report is received. + As of this writing, + Garmin's PVT + protocol + and + + NMEA + are supported + inputs. KML, NMEA, and the various XCSV formats are supported on + output. Additional formats may be added by interested parties + later. + + Read realtime positioning from Garmin USB, write to Keyhole Markup + + gpsbabel -T -i garmin -f usb: -o kml -F xxx.kml + + Will read the USB-connected Garmin and rewrite 'xxx.kml' atomically, suitable for a self-refreshing network link in Google Earth. - - - - Read realtime positioning from Wintec WBT-201 via Bluetooth on Mac, write to Keyhole Markup - gpsbabel -T -i nmea -f /dev/cu.G-Rays2-SPPslave-1 -o kml -F xxx.kml - - Will read the Wintec WBT-201 via Bluetooth, using the name that + + + Read realtime positioning from Wintec WBT-201 via Bluetooth on Mac, write to Keyhole Markup + + gpsbabel -T -i nmea -f /dev/cu.G-Rays2-SPPslave-1 -o kml -F xxx.kml + + Will read the Wintec WBT-201 via Bluetooth, using the name that the Mac assigned it, and rewrite 'xxx.kml' atomically, suitable for a self-refreshing network link in Google Earth. - - + + Be sure to substitute an device name appropriate for your device + and OS, such as + /dev/cu.usbserial + or - - Be sure to substitute an device name appropriate for your device - and OS, such as /dev/cu.usbserial or - /dev/cu.BT-GPS-37A695-BT-GPSCOM-1 - for Mac, COM23: for Windows, or - usb: for - Garmin USB. These names - (except the "usb:" parlance for Garmin USB) are assigned by - your operating system. + /dev/cu.BT-GPS-37A695-BT-GPSCOM-1 + for Mac, + COM23: + for Windows, or - - + usb: + for - - Batch mode (command files) - - In addition to reading arguments from the command line, GPSBabel can - read directions from batch (or command) files via the option. - - - These files are ideal for holding long command lines, long file lists, complex filters + Garmin USB + . These names + (except the "usb:" parlance for Garmin USB) are assigned by + your operating system. + + + Batch mode (command files) + In addition to reading arguments from the command line, GPSBabel can + read directions from batch (or command) files via the + + option. + These files are ideal for holding long command lines, long file lists, complex filters and so on. You can use all GPSBabel options and combinations when writing - such files. Nesting batch files by using the option within a batch file is supported. - - - Here is an example demonstrating segmenting a large command line + such files. Nesting batch files by using the + + option within a batch file is supported. + Here is an example demonstrating segmenting a large command line by placing the input and filtering directives in a file called 'all_my_files'. - gpsbabel -b all_my_files -o gdb -F all_my_tracks.gdb - - 'all_my_files' could look like this: - - - -i gpx - -f saxony_in_summer_2004.gpx -f austria_2005.gpx - -i gdb - -f croatia_2006.gdb - -x nuketypes,waypoints,routes - -x track,pack,split,title="LOG # %Y%m%d" - - - - List of Options - - The complete list of available options to GPSBabel can be obtained by - running gpsbabel -h. While there are a number of - options, most people will not use most of them, so don't be intimidated. + + gpsbabel -b all_my_files -o gdb -F all_my_tracks.gdb + + 'all_my_files' could look like this: - Read preferences file. On startup, GPSBabel will look for a file named gpsbabel.ini containing preferences you have provided. This option lets you pick a different files. See for more info. - Write "smart" names. This option influences some - but not all - of our writers to try to build "smart" waypoint names. For example, in modules that know about geocaching, it may replace "GC1234" with the actual name of the geocache. - Work on routes. This option has a subtly different meaning in different cases. As the very first formats in GPSBabel were for serial GPSes and routes and tracks were large and thus time-consuming to transfer, the default was waypoints only with this option to turn on the extra data. Some of our file formats use this option to mean "work only on routes, even if you have tracks/waypoints", but we're trying to discourage that behavior and in most cases, consider it a bug. - Work on tracks. See for excuses. - Work on waypoints. This is the default. - Enable Realtime tracking. This option isn't supported by the majority of our file formats, but repeatedly reads location from a GPS and writes it to a file as described in - Process batch file. In addition to reading arguments from the command line, we can read them from files containing lists of commands as described in - Run filter. This option lets use use one of of our many data filters. Position of this in the command line does matter - remember, we process left to right. - Enable debugging. Not all formats support this. It's typically better supported by the various protocol modules because they just plain need more debugging. This option may be followed by a number. Zero means no debugging. Larger numbers mean more debugging. - Print help. - Print version number. - - + + -i gpx + -f saxony_in_summer_2004.gpx -f austria_2005.gpx + -i gdb + -f croatia_2006.gdb + -x nuketypes,waypoints,routes + -x track,pack,split,title="LOG # %Y%m%d" + + + + List of Options + The complete list of available options to GPSBabel can be obtained by + running + gpsbabel -h + . While there are a number of + options, most people will not use most of them, so don't be intimidated. + + Read preferences file. On startup, GPSBabel will look for a file named + gpsbabel.ini + containing preferences you have provided. This option lets you pick a different files. See + + for more info. + + Write "smart" names. This option influences some - but not all - of our writers to try to build "smart" waypoint names. For example, in modules that know about geocaching, it may replace "GC1234" with the actual name of the geocache. + + Work on routes. This option has a subtly different meaning in different cases. As the very first formats in GPSBabel were for serial GPSes and routes and tracks were large and thus time-consuming to transfer, the default was waypoints only with this option to turn on the extra data. Some of our file formats use this option to mean "work only on routes, even if you have tracks/waypoints", but we're trying to discourage that behavior and in most cases, consider it a bug. + + Work on tracks. See + + for excuses. + + Work on waypoints. This is the default. + + Enable Realtime tracking. This option isn't supported by the majority of our file formats, but repeatedly reads location from a GPS and writes it to a file as described in + + + Process batch file. In addition to reading arguments from the command line, we can read them from files containing lists of commands as described in + + + Run filter. This option lets use use one of of our many data filters. Position of this in the command line does matter - remember, we process left to right. + + Enable debugging. Not all formats support this. It's typically better supported by the various protocol modules because they just plain need more debugging. This option may be followed by a number. Zero means no debugging. Larger numbers mean more debugging. + + + Print help. + + Print version number. + + \ No newline at end of file diff --git a/xmldoc/formats/options/miniHomer-gps-utc-offset.xml b/xmldoc/formats/options/miniHomer-gps-utc-offset.xml new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/xmldoc/formats/options/miniHomer-gps-utc-offset.xml @@ -0,0 +1 @@ + diff --git a/xmldoc/formats/options/miniHomer-gps-week-rollover.xml b/xmldoc/formats/options/miniHomer-gps-week-rollover.xml new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/xmldoc/formats/options/miniHomer-gps-week-rollover.xml @@ -0,0 +1 @@ + diff --git a/xmldoc/gpsbabel_man.xml b/xmldoc/gpsbabel_man.xml index 06af3bdf9..7a9cedef9 100644 --- a/xmldoc/gpsbabel_man.xml +++ b/xmldoc/gpsbabel_man.xml @@ -1,92 +1,128 @@ - + - - -gpsbabel -1 - - - -gpsbabel - - convert and manipulate waypoints, tracks, and routes between formats. + + gpsbabel + 1 + + + gpsbabel + convert and manipulate waypoints, tracks, and routes between formats. - - - - -gpsbabel - - - -file - - - -Description - - GPSBabel converts waypoints, tracks, and routes from one format to - another. GPSBabel also downloads and uploads waypoints, tracks, - and routes to and from a GPS receiver (such as those by Garmin and - Magellan) connected by a serial or USB port. + + + + gpsbabel + + + + file + + + + Description + GPSBabel converts waypoints, tracks, and routes from one format to + another. GPSBabel also downloads and uploads waypoints, tracks, + and routes to and from a GPS receiver (such as those by Garmin and + Magellan) connected by a serial or USB port. - - - By flattening the Tower of Babel that the authors of various programs - for manipulating GPS data have imposed upon us, it returns to us the - ability to freely move our own waypoint data between the programs and - hardware we choose to use. + By flattening the Tower of Babel that the authors of various programs + for manipulating GPS data have imposed upon us, it returns to us the + ability to freely move our own waypoint data between the programs and + hardware we choose to use. - - It contains extensive data + It contains extensive data manipulation abilities making it a convenient for server-side processing -or as the backend for other tools. - -Options - - GPSBabel accepts the following options and processes them in order - from left to right.. Additional options are documented in the - docbook help. +or as the backend for other tools. + + + Options + GPSBabel accepts the following options and processes them in order + from left to right.. Additional options are documented in the + docbook help. - - - format - Use format as the type file to read. - - - name - Use name as the filename to read. - - - format - Use format as the type of file to read. - - - name - Use name as the filename to write. - - - filter - Invoke an internal filter on the data. - - - - Generate smart names for waypoints on output. - - - format - Display help that is more exhaustive than this page. If format is given, provide help for only that format. - - -Lists of filters and formats are given in the doc at http://www.gpsbabel.org. - - -See Also - - http://www.gpsbabel.org + + + + + format + + + Use + format + as the type file to read. + + + + + + name + + + Use + name + as the filename to read. + + + + + + format + + + Use + format + as the type of file to read. + + + + + + name + + + Use + name + as the filename to write. + + + + + + filter + + + Invoke an internal + filter + on the data. + + + + + + + + Generate smart names for waypoints on output. + + + + + + format + + + Display help that is more exhaustive than this page. If + format + is given, provide help for only that format. + + + + Lists of filters and formats are given in the doc at http://www.gpsbabel.org. + + + See Also + http://www.gpsbabel.org - - - - + + \ No newline at end of file diff --git a/xmldoc/readme.xml b/xmldoc/readme.xml index 2115729dc..827e50d8b 100644 --- a/xmldoc/readme.xml +++ b/xmldoc/readme.xml @@ -16,5 +16,5 @@ &allchapters; - + -- 2.30.2